package com.lc.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

import com.cnpc.framework.utils.DateUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;

/**
 * @Description
 * @Author  Nomaj
 * @Date 2022-03-10
 */

@Setter
@Getter
@ToString
@Entity
@Table ( name ="app_help" )
public class AppHelp  implements Serializable {

	private static final long serialVersionUID =  7776234331814787697L;

	@Id
	@GenericGenerator(name = "id", strategy = "uuid")
	@GeneratedValue(generator = "id")
	@Column(name = "id", length = 36)
	private String id;

	/**
	 * 创建时间
	 */
   	@Column(name = "createtime" )
	private String createtime;

	/**
	 * 更新时间
	 */
   	@Column(name = "updatetime" )
	private String updatetime;

   	@Column(name = "title" )
	private String title;

   	@Column(name = "content" )
	private String content;

   	@Column(name = "status" )
	private Long status;

   	@Column(name = "remark" )
	private String remark;

	/**
	 * 类别 字典
	 */
   	@Column(name = "type" )
	private String type;

	public void setDefaultTime(){
		String dateTime = DateUtil.format(new Date(),DateUtil.YYYY_MM_DD_HH_MM_SS);
		createtime = dateTime;
		updatetime = dateTime;
	}

	public void setDefaultCreateTime(){
		String dateTime = DateUtil.format(new Date(),DateUtil.YYYY_MM_DD_HH_MM_SS);
		createtime = dateTime;
	}

	public void setDefaultUpdateTime(){
		String dateTime = DateUtil.format(new Date(),DateUtil.YYYY_MM_DD_HH_MM_SS);
		updatetime = dateTime;
	}

}
